<template>
  <div>
    <div class="top">
      <img class="container" src="../../assets/1.jpg" alt="" />
    </div>
    <div class="text"   >
    <div class="main">
      <el-form :model="addForm" label-width="80px">
        <div class="min"   >
           <el-form-item label="应聘标题:">
          <el-input type="text" v-model="addForm.total"></el-input>
        </el-form-item>
        </div>
         
        <el-form-item label="职位:">
          <el-input type="text" v-model="addForm.position"></el-input>
        </el-form-item>
        <el-form-item label="是否应聘:">
        <el-select v-model="addForm.applicant" placeholder="是否应聘">
          <el-option label="是" value="是"  ></el-option>
           <el-option label="否" value="否" ></el-option>
        </el-select>
        </el-form-item>
        <!-- <el-form-item label="应聘时间:">
          <el-input type="text" v-model="addForm.createTime"   ></el-input>
        </el-form-item> -->
        <el-form-item label="账号:">
          <el-input type="text" v-model="addForm.username"></el-input>
        </el-form-item>
        <el-form-item label="姓名:">
          <el-input type="text" v-model="addForm.name"></el-input>
        </el-form-item>
        <el-form-item label="手机号:">
          <el-input type="text" v-model="addForm.phone"></el-input>
        </el-form-item>
        <el-input type="textarea"></el-input>
      </el-form>
    </div>
    <span slot="footer">
        <el-button @click="addDialogVisible = false">取消</el-button>
        <el-button type="primary" @click="addVolunteer">确定</el-button>
      </span>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      addForm: {},
      addDialogVisible: false,
      total: '',
      position: '',
      username: '',
      name: '',
      phone: '',
      applicant:'',
    };
  },
  methods: {
    async getList() {
      let { data: res } = await this.$axios.get("/volunteer/getlist");
      // this.total = res.data.total;
      this.tableData = res.data.list;
    },
    async addVolunteer() {
      let { data: res } = await this.$axios.post("/volunteer/add", JSON.stringify(this.addForm),{
        headers:{
          "content-type":"application/json"
        }
      });
      window.console.log(res); //目标值为200
      if (res.code != 200) return this.$message.error(res.message);
      this.$message.success(res.code);
      this.addDialogVisible = false;
    },
  },
  created() {
    this.getList();
  },
};
</script>

<style scoped lang="scss"  >
* {
  margin: 0;
  padding: 0;
}
.text{
  width: 100%;
  height: 700px;
  background-color:azure
}
.top {
  img {
    width: 100%;
    height: 200px;
    margin-top: -100px;
  }
}
.main{
  width: 600px;
  margin: 0 auto;
  background-color: #fff;
  box-shadow: 10px 10px 10px rgb(117, 209, 251);
  padding: 30px;
  // .el-form-item{
  //   box-shadow: inset 5px 5px 10px rgb(117, 209, 251); 
  //   .el-input{
  //     border: 1px #fff solid; 
  //   }
  // }
}
.min{
  box-shadow: inset 5px 5px 10px rgb(117, 209, 251); 
  padding: 10px;
}
</style>